<template>
  <!-- 头部标题栏 -->
  <div class="article">
   <router-view></router-view>
  </div>
</template>
<script>
export default {
  data() {
    return {
      selected: "upgrade",
      swipeHeight: "0px",
      navactive: "0",
    };
  },
  methods: {
    initSwipeHeight() {
      // 通过公式  计算轮播图应该设置的高度
      let picwidth = 766;
      let picheight = 266;
      let screenwidth = window.screen.width;
      let height = Math.floor((picheight * screenwidth) / picwidth) + "px";
      this.swipeHeight = height;
    },
  },
  mounted() {
    this.initSwipeHeight();
  },
  watch: {
    navactive() {
      // if (this.navactive == "5") {
      //   this.navactive = "1";
      // }
      // this.$router.push(`list/lid=${this.navactive}`);
      this.$router.push(`/renew/list`);
    },
  },
};
</script>
<style>
/* 头部标题栏 */
.article .head {
  color: #000;
  font-size: 18px;
  background-color: #fff;
}
/* 轮播图 */
.article .mtswipe {
  position: relative;
  top: 62px;
}
.article .mtswipe img {
  width: 100%;
}
/* 导航栏 */
.article .mint-navbar {
  top: 75px;
  position: relative;
}
.article .mint-navbar .mint-tab-item.is-selected {
  color: #000;
  border-bottom: 2px solid red;
}
/* 面板 */
.article .commodity {
  width: 350px;
  display: flex;
}
.article .title {
  width: 228px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.article .commodity {
  height: 150px;
  margin: 8px auto;
  padding: 18px 0px;
  border-radius: 14px;
  box-sizing: border-box;
  background-color: #fff;
}
.article .promptly {
  margin-top: 15px;
  text-align: center;
  border-radius: 25px;
  width: 80px;
  height: 25px;
  border: 1px solid red;
}
.article .promptly a {
  color: red;
  font-size: 0.59733rem;
  line-height: 25px;
  text-decoration: none;
}
.article .discounts {
  color: #fff;
  position: absolute;
  top: -17px;
  right: 0;
  text-align: center;
  width: 65px;
  height: 41px;
  background-color: #f74444;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 10px;
}
.article .gather {
  margin-top: 28px;
}

.article .nav a {
  font-size: 12px;
  color: #000;
  text-decoration: none;
}
</style>
